import an7 from '@dfeidao/fd-an000007';
import an82 from '@dfeidao/fd-an000082';
import { IncomingHttpHeaders } from 'http';

interface Message {
	page: number;
	search: string;
}

export default async function atom(message: Message, action_id: string, session_id: string, headers: IncomingHttpHeaders): Promise<an82> {
	an7('Service begin path:pg001/zj-001/s002,action_id:' + action_id);
	// 记录日志
	an7(`page:${message.page}, search ${message.search}`, 'pg001/zj-001/s002');
	an7('Service end path:pg001/zj-001/s002,action_id:' + action_id);
	return {
		data: {
			"results": [
				{
					"id": 1,
					"text": "Option 1"
				},
				{
					"id": 2,
					"text": "Option 2"
				}
			],
			"pagination": {
				"more": true
			}
		}
	} as an82;
}
